package cn.edu.scau.cmi.ema.dao;

import java.util.Set;

import org.springframework.dao.DataAccessException;
import cn.edu.scau.cmi.ema.domain.*;
import cn.edu.scau.cmi.ema.domain.base.CmiPagination;

import java.util.Calendar;

public interface EventDAO extends JpaDao<Event> {

	public Event findEventById(Integer id) throws DataAccessException;

	public Event findEventById(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Event> findEventByName(String name) throws DataAccessException;

	public Set<Event> findEventByName(String name, int startResult, int maxRows) throws DataAccessException;

	public Set<Event> findEventByNameContaining(String name_1) throws DataAccessException;

	public Set<Event> findEventByNameContaining(String name_1, int startResult, int maxRows) throws DataAccessException;

	public Set<Event> findEventBySourceTime(Calendar sourceTime) throws DataAccessException;

	public Set<Event> findEventBySourceTime(Calendar sourceTime, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Event> findEventByDiscoveryTime(Calendar discoveryTime) throws DataAccessException;

	public Set<Event> findEventByDiscoveryTime(Calendar discoveryTime, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Event> findEventByAuditTime(Calendar auditTime) throws DataAccessException;

	public Set<Event> findEventByAuditTime(Calendar auditTime, int startResult, int maxRows) throws DataAccessException;

	public Set<Event> findEventByCrawlTime(Calendar crawlTime) throws DataAccessException;

	public Set<Event> findEventByCrawlTime(Calendar crawlTime, int startResult, int maxRows) throws DataAccessException;

	public Set<Event> findEventByStatus(Boolean status) throws DataAccessException;

	public Set<Event> findEventByStatus(Boolean status, int startResult, int maxRows) throws DataAccessException;

	public Set<Event> findEventByDescription(String description) throws DataAccessException;

	public Set<Event> findEventByDescription(String description, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Event> findEventByDescriptionContaining(String description_1) throws DataAccessException;

	public Set<Event> findEventByDescriptionContaining(String description_1, int startResult, int maxRows)
			throws DataAccessException;

	public Event findEventByPrimaryKey(Integer id) throws DataAccessException;

	public Event findEventByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Event> findEventsByIds(Set<Integer> ids) throws DataAccessException;

	public Set<Event> findAllEvents() throws DataAccessException;

	public Set<Event> findAllEvents(int startResult, int maxRows) throws DataAccessException;

	public Set<Event> findEventsBySourceAddress(Integer addressId, int start, int max);

	public Set<Event> findEventsByDiscoveryAddress(Integer addressId, int start, int max);

	public Set<Event> findEventsBySubject(Integer subjectId, int start, int max);

	public Set<Event> findEventsByAuditor(Integer userId, int start, int max);

	public Set<Event> findEventsByUrl(Integer urlId, int start, int max);

	public Set<Event> findEventsByReportor(Integer userId, int start, int max);

	public Set<Event> findEventsByParent(Integer eventId, int start, int max);

	public Set<Event> findEventsByFoodbatch(Integer foodbatchId, int start, int max);

	public Set<Event> findEventByCompositeProperities(String sql, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Event> findEventsByDetachedCriteria(CmiPagination page) throws DataAccessException;

	public Set<Integer> findEventIdsByParent(int rootEventId) throws DataAccessException;

	public Event findEventByPhysicalPrimaryKey(Integer subjectId, Integer foodbatchId) throws DataAccessException;

	public Event findEventByPhysicalPrimaryKey(Integer subjectId, Integer foodbatchId, int startResult, int maxRows)
			throws DataAccessException;
}
